# browsershots.org - Test your web design in different browsers
# Copyright (C) 2008 Johann C. Rocholl <johann@browsershots.org>
#
# Browsershots is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Browsershots is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Browsershots. If not, see <http://www.gnu.org/licenses/>.

"""
Django admin for the platforms app.
"""

__revision__ = "$Rev: 3095 $"
__date__ = "$Date: 2008-09-13 20:40:11 +0000 (Sat, 13 Sep 2008) $"
__author__ = "$Author: johann $"

from django.contrib import admin
from shotserver05.platforms.models import Platform, OperatingSystem


class PlatformAdmin(admin.ModelAdmin):
    list_display = ('slug', 'name')
    prepopulated_fields = {'slug': ('name', )}
    ordering = ('slug', )


class OperatingSystemAdmin(admin.ModelAdmin):
    list_display = ('slug', 'name', 'version', 'codename', 'platform')
    prepopulated_fields = {'slug': ('codename', )}
    ordering = ('slug', )


admin.site.register(Platform, PlatformAdmin)
admin.site.register(OperatingSystem, OperatingSystemAdmin)
